#ifndef ISRADC_H__3cf7a71d_85f6_4e26_b1c3_236cf768539d
#define ISRADC_H__3cf7a71d_85f6_4e26_b1c3_236cf768539d


/*
**
** Copyright (c) 2010 by Lorimark Solutions, LLC.
** All Rights Reserved.
** Send inquiries to: info@lorimarksolutions.com
**
*/

/*
** Define the number of channels in this interrupt
**  service procedure.  This must be done before
**  compiling the application
**
*/
#define ISRADC_CHANNELS 9

/*
** UNCOMMENT TO ENABLE
** This causes the conversion to stop on each interrupt.
**  You can enable this feature if you want only one
**  conversion to occur at a time, and to start each
**  individual conversion with another external event.
**
*/
//#define ISRADC_STOP_CONVERTING

/*
** UNCOMMENT TO ENABLE
** This ISP can optionally map hardware A/D channels
**  to a logical channel set. You only want to do this
**  if you need to skip channels, or process them in
**  a particular order.  See isradc.S for details.
**
*/
//#define ISRADC_HARDWARE_MAP

/*
** UNCOMMENT TO ENABLE
** As readings are taken, they can be averaged.
*/
#define ISRADC_AVG

/*
** UNCOMMENT TO ENABLE
** Record the minimum value during conversion
**
*/
#define ISRADC_MIN

/*
** UNCOMMENT TO ENABLE
** Record the maximum value during conversion
**
*/
#define ISRADC_MAX

/*
** Global register variables.
**
*/
#ifdef __ASSEMBLER__

#else  // !ASSEMBLER

#include <stdint.h>

void ADC_InitMinMax(void);

typedef struct
{
  sint16 raw;
  sint16 avg;
  sint16 min;
  sint16 max;
} adata_t;

#endif // ASSEMBLER

#endif // #ifndef ISRADC_H__3cf7a71d_85f6_4e26_b1c3_236cf768539d
